package myStruct

import "fmt"

//结构体定义 值类型
type Student struct {
	Name string
	Age  int
}

//结构体声明的三种方式
var stu Student
var stu1 *Student = new(Student)
var stu2 *Student = &Student{}

func Test() {
	stu1.Age = 18
	stu1.Name = "张三"
	fmt.Println(stu1)
	fmt.Printf("%p\t%p\t%p", stu1, &stu1.Age, &stu1.Name)
}
